import  Vue from 'vue'
import Router from 'vue-router'

import Parent from '@/views/Parent'
import Index from '@/views/page/Index'
import Home from '@/views/page/Home'  //首页
import Recommend from '@/views/page/Recommend'  //推荐
import Cart from '@/views/page/Cart'  //购物车
import Service from '@/views/page/Service'  //客服
import Center from '@/views/page/Center'  //我的

import RecommendDetail from '@/views/page/RecommendDetail'  //新闻页

import CustomerService from '@/views/page/CustomerService'  //客服

import SeckillList from '@/views/page/SeckillList'  //限时抢购列表

import Search from '@/views/page/Search' //搜索输入页
import SearchResult from '@/views/page/SearchResult' //搜索输入页
import ProductDetail from '@/views/page/ProductDetail' //商品详情页
import orderConfirmation from '@/views/page/orderConfirmation' //确认订单
import PaymentSuccess from '@/views/page/PaymentSuccess' //支付成功
import RecommendProductList from '@/views/page/RecommendProductList' //为你推荐
import Classify from '@/views/page/Classify' //分类页
import ProductAllCommend from '@/views/page/ProductAllCommend' //单商品全部评论

import CouponList from '@/views/page/CouponList' //我的优惠券
import EnshrineList from '@/views/page/EnshrineList' //我的收藏
import AddressList from '@/views/page/AddressList' //地址列表
import AddressEditor from '@/views/page/AddressEditor' //地址编辑
import OrderList from '@/views/page/OrderList' //我的订单
import OrderDetail from '@/views/page/OrderDetail' //订单详情
import LogisticsDetail from '@/views/page/LogisticsDetail' //物流详情
import DealSuccess from '@/views/page/DealSuccess' //交易成功

import AfterSaleList from '@/views/page/AfterSaleList' //退款、售后
import AfterSaleService from '@/views/page/AfterSaleService' //退款、售后--临时
import Refund from '@/views/page/Refund' //选择退款商品
import AfterType from '@/views/page/AfterType' //选择售后类型
import AfterSaleSubmit from '@/views/page/AfterSaleSubmit' //售后申请提交
import AfterSaleDetail from '@/views/page/AfterSaleDetail' //售后详情
import AfterSaleLogistics from '@/views/page/AfterSaleLogistics' //填写售后物流信息

import Comment from '@/views/page/Comment' //商品评价
import CommentSuccess from '@/views/page/CommentSuccess' //评价结果
import CommentList from '@/views/page/CommentList' //我的评价

import FilialPiety from '@/views/page/FilialPiety' //孝心传递
import ProblemFeedback from '@/views/page/ProblemFeedback' //问题反馈
import RecommendCourteous from '@/views/page/RecommendCourteous' //推荐有礼
import InvitationRegister from '@/views/page/InvitationRegister' //邀请注册

import IntegralExchange from '@/views/page/IntegralExchange' //积分兑换
import IntegralSubsidiary from '@/views/page/IntegralSubsidiary' //积分明细
import IntegralRule from '@/views/page/IntegralRule' //积分规则
import IntegralRecord from '@/views/page/IntegralRecord' //积分记录

import GetCoupon from '@/views/page/GetCoupon' //领取优惠券
import GetCouponResult from '@/views/page/GetCouponResult' //领取优惠券结果页

import ApplicationPartner from '@/views/page/ApplicationPartner'//申请合伙人

import MySalesman from '@/views/page/MySalesman'//我的销售员
import SearchSalesman from '@/views/page/SearchSalesman'//搜索销售员
import SearchSalesmanResult from '@/views/page/SearchSalesmanResult'//搜索销售员结果页

import MyBalance from '@/views/page/MyBalance'//我的余额
import WithdrawCordInfo from '@/views/page/WithdrawCordInfo'//提现填写卡号
import WithdrawUserInfo from '@/views/page/WithdrawUserInfo'//提现填写用户信息
import WithdrawSub from '@/views/page/WithdrawSub'//提现申请提交

import WithdrawalRecord from '@/views/page/WithdrawalRecord'//提现记录

import SetMore from '@/views/page/SetMore'//更多设置

import MemberRightsAndInterests from '@/views/page/MemberRightsAndInterests'//会员权益

import SalesStatistics from '@/views/page/SalesStatistics'//销售数据
import PushMoney from '@/views/page/PushMoney'//累计收益

import AddSalesman from '@/views/page/AddSalesman'  //分享

import VipRule from '@/views/page/VipRule'//会员权益
import Jigsaw from '@/views/page/Jigsaw'//拼图
import Turntable from '@/views/page/Turntable'//大转盘

import ProductW1 from '@/views/page/ProductWl'//活动页面

import ManXingYunActivity from '@/views/page/ManXingYunActivity'//满星云活动页面

import NetworkSet from '@/views/new/NetworkSet' // 网点套餐设置
import AddNetwork from '@/views/new/AddNetwork' // 添加网点设置
import NetworkPackage from '@/views/new/NetworkPackage' // 网点套餐
import AddPackage from '@/views/new/AddPackage' // 添加套餐
import AddDevice from '@/views/new/AddDevice' // 添加设备

import ShareSign from '@/views/page/ShareSign' // 分享领好礼
import NewUserPrize from '@/views/page/NewUserPrize' // 新用户福利

import Register from '@/views/login/Register' // 注册
import ForgetPwdAuthentication from '@/views/login/ForgetPwdAuthentication' // |忘记密码--身份验证
import RestPwd from '@/views/login/RestPwd' // 忘记密码--重置密码
import Login from '@/views/login/Login' // 登陆
import RestPwdFromCenter from '@/views/login/RestPwdFromCenter' // 修改密码--个人中心

import PCPay from '@/views/page/PCPay' // PC--支付

import Gobang from '@/views/page/Gobang' // 五子棋

import GetAddressPage from '@/views/page/GetAddressPage' // 定位收货地址
import QuestionnaireSurvey from '@/views/page/QuestionnaireSurvey' // 问卷调查
import WaterCardDetail from '@/views/page/WaterCardDetail' // 水卡详情
import WaterRecords from '@/views/page/WaterRecords' // 水卡使用记录
import ChooseWaterShop from '@/views/page/ChooseWaterShop' // 确认订单
import PromotionCode from '@/views/page/PromotionCode' // 推广二维码
import WaterOrderList from '@/views/page/WaterOrderList' // 推广二维码

import Information from '@/views/page/Information' // 咨询
import ColumnList from '@/views/page/ColumnList' // 咨询列表
import Activities from '@/views/page/Activities' // 活动
import ActivitiDetail from '@/views/page/ActivitiDetail' // 活动详情
import AddOnItem from '@/views/page/AddOnItem' // 凑单商品

import NewProducts from '@/views/page/NewProducts' // 新品上架

import LimitProductList from '@/views/page/LimitProductList' // 每日限量疯抢榜

import BindingFamily from '@/views/healthMonitoring/BindingFamily' // 绑定家人
import AddFamily from '@/views/healthMonitoring/AddFamily' // 添加家人
import DetectionResultDay from '@/views/healthMonitoring/DetectionResultDay' // 检测结果
import DetectionResultMonth from '@/views/healthMonitoring/DetectionResultMonth' // 检测结果
import UserHealthData from '@/views/healthMonitoring/UserHealthData' // 用户健康数据
import FillInfo from '@/views/healthMonitoring/FillInfo' // 用户信息

Vue.use(Router);

export default new Router({
  mode: 'history',
//  base: '/dist',
  scrollBehavior (to, from, savedPosition) {
    // return 期望滚动到哪个的位置
    if(savedPosition){
      return savedPosition
    }else{
      return {x:0,y:0}
    }
  },
  routes: [
    {
      path: '/',
      redirect:'/index'
    },
    {
      path: '/index',
      name: 'Parent',
      component: Parent,
      children:[
        // {
        //   path: '/index',
        //   component: Index,
        //   children:[
        //     {
        //       path: '/home',
        //       name:'home',
        //       component: Home,
        //       meta: {
        //         // title:'SOFO按摩'
        //       }
        //     },
        //     {
        //       path:'/recommend',
        //       name: 'recommend',
        //       component: Recommend,
        //       meta : {
        //         // title: '推荐'
        //       }
        //     },
        //     {
        //       path:'/cart',
        //       name: 'cart',
        //       component: Cart,
        //       meta : {
        //         // title: '购物车'
        //       }
        //     },
        //     {
        //       path:':tabberName',
        //       name: 'service',
        //       component: Service,
        //       meta : {
        //         // title: '客服'
        //       }
        //     },
        //     {
        //       path:'/center',
        //       name: 'center',
        //       component: Center,
        //       meta : {
        //         // title: '我的'
        //       }
        //     },
        //   ]
        // },
        {
          path: '/index',
          name:'home',
          component: Home,
        },
        {
          path:'/index/web/NetworkSet',
          name: 'NetworkSet',
          component: NetworkSet,
          meta : {
            title: '网点套餐设置'
          }
        },
        {
          path:'/index/web/AddNetwork',
          name: 'AddNetwork',
          component: AddNetwork,
          meta : {
            title: '添加网点'
          }
        },
        {
          path:'/index/web/NetworkPackage',
          name: 'NetworkPackage',
          component: NetworkPackage,
          meta : {
            title: '网点套餐'
          }
        },
        {
          path:'/index/web/AddPackage',
          name: 'AddPackage',
          component: AddPackage,
          meta : {
            title: '添加套餐'
          }
        },
        {
          path:'/index/web/AddDevice',
          name: 'AddDevice',
          component: AddDevice,
          meta : {
            title: '添加设备'
          }
        },
        {
          path:'/index/web/recommend',
          name: 'recommend',
          component: Recommend,
          meta : {
            title: '推荐'
          }
        },
        {
          path:'/index/web/cart',
          name: 'cart',
          component: Cart,
          meta : {
            title: '购物车'
          }
        },
        {
          path:'/index/web/service',
          name: 'service',
          component: Service,
          meta : {
            title: '客服'
          }
        },
        {
          path:'/index/web/center',
          name: 'center',
          component: Center,
          meta : {
            title: '我的'
          }
        },
        {
          path:'/index/web/search',
          name:'search',
          component: Search,
          meta:{
            title:'搜索'
          }
        },
        {
          path:'/index/web/result',
          name:'result',
          component: SearchResult,
          meta:{
            title:'搜索'
          }
        },
        {
          path:'/index/web/productDetail',
          name:'productDetail',
          component: ProductDetail,
          meta:{
            title:'商品详情'
          }
        },
        {
          path:'/index/web/orderConfirmation',
          name:'orderConfirmation',
          component: orderConfirmation,
          meta: {
            title:'确认订单'
          }
        },
        {
          path:'/index/web/paymentSuccess',
          name:'paymentSuccess',
          component: PaymentSuccess,
          meta:{
            title: '支付成功'
          }
        },
        {
          path:'/index/web/couponList',
          name:'couponList',
          component: CouponList,
          meta:{
            title: '我的优惠券'
          }
        },
        {
          path:'/index/web/enshrineList',
          name:'enshrineList',
          component: EnshrineList,
          meta:{
            title: '我的收藏'
          }
        },
        {
          path:'/index/web/addressList',
          name:'addressList',
          component: AddressList,
          meta:{
            title: '地址列表'
          }
        },
        {
          path:'/index/web/addressEditor',
          name:'addressEditor',
          component: AddressEditor,
          meta:{
            title: '地址列表'
          }
        },
        {
          path:'/index/web/orderList',
          name:'orderList',
          component: OrderList,
          meta:{
            title: '订单'
          }
        },
        {
          path:'/index/web/recommendDetail',
          name:'recommendDetail',
          component: RecommendDetail,
          meta:{
            title: '资讯'
          }
        },
        {
          path:'/index/web/orderDetail',
          name:'orderDetail',
          component: OrderDetail,
          meta:{
            title: '订单详情'
          }
        },
        {
          path:'/index/web/logisticsDetail',
          name:'logisticsDetail',
          component: LogisticsDetail,
          meta:{
            title: '物流详情'
          }
        },
        {
          path:'/index/web/recommendProductList',
          name:'recommendProductList',
          component: RecommendProductList,
          meta:{
            title: '为你推荐'
          }
        },
        {
          path:'/index/web/productAllCommend',
          name:'productAllCommend',
          component: ProductAllCommend,
          meta:{
            title: '商品详情'
          }
        },
        {
          path:'/index/web/classify',
          name:'classify',
          component: Classify,
          meta:{
            title: '分类'
          }
        },
        {
          path:'/index/web/afterSaleList',
          name:'afterSaleList',
          component: AfterSaleList,
          meta:{
            title: '退款/售后'
          }
        },
        {
          path:'/index/web/refund',
          name:'refund',
          component: Refund,
          meta:{
            title: '选择退款商品'
          }
        },
        {
          path:'/index/web/afterType',
          name:'afterType',
          component: AfterType,
          meta:{
            title: '选择售后类型'
          }
        },
        {
          path:'/index/web/afterSaleSubmit',
          name:'afterSaleSubmit',
          component: AfterSaleSubmit,
          meta:{
            title: '售后申请提交'
          }
        },
        {
          path:'/index/web/comment',
          name:'comment',
          component: Comment,
          meta:{
            title: '商品评价'
          }
        },
        {
          path:'/index/web/commentSuccess',
          name:'commentSuccess',
          component: CommentSuccess,
          meta:{
            title: '评价结果'
          }
        },
        {
          path:'/index/web/commentList',
          name:'commentList',
          component: CommentList,
          meta:{
            title: '我的评价'
          }
        },
        {
          path:'/index/web/filialPiety',
          name:'filialPiety',
          component: FilialPiety,
          meta:{
            title: '孝心传递'
          }
        },
        {
          path:'/index/web/problemFeedback',
          name:'problemFeedback',
          component: ProblemFeedback,
          meta:{
            title: '问题反馈'
          }
        },
        {
          path:'/index/web/afterSaleDetail',
          name:'afterSaleDetail',
          component: AfterSaleDetail,
          meta:{
            title: '售后详情'
          }
        },
        {
          path:'/index/web/afterSaleLogistics',
          name:'afterSaleLogistics',
          component: AfterSaleLogistics,
          meta:{
            title: '填写售后物流信息'
          }
        },
        {
          path:'/index/web/seckillList',
          name:'seckillList',
          component: SeckillList,
          meta:{
            title: '限时抢购'
          }
        },
        {
          path:'/index/web/dealSuccess',
          name:'dealSuccess',
          component: DealSuccess,
          meta:{
            title: '交易成功'
          }
        },
        {
          path:'/index/web/recommendCourteous',
          name:'recommendCourteous',
          component: RecommendCourteous,
          meta:{
            title: '推荐有礼'
          }
        },
        {
          path:'/index/web/invitationRegister',
          name:'invitationRegister',
          component: InvitationRegister,
          meta:{
            title: '邀请注册'
          }
        },
        {
          path:'/index/web/AfterSaleService',
          name:'AfterSaleService',
          component: AfterSaleService,
          meta:{
            title: '售后/退款'  //临时用
          }
        },
        {
          path:'/index/web/integralExchange',
          name:'integralExchange',
          component: IntegralExchange,
          meta:{
            title: '积分换礼'
          }
        },
        {
          path:'/index/web/integralSubsidiary',
          name:'integralSubsidiary',
          component: IntegralSubsidiary,
          meta:{
            title: '积分明细'
          }
        },
        {
          path:'/index/web/integralRule',
          name:'integralRule',
          component: IntegralRule,
          meta:{
            title: '积分规则'
          }
        },
        {
          path:'/index/web/integralRecord',
          name:'integralRecord',
          component: IntegralRecord,
          meta:{
            title: '兑换记录'
          }
        },
        {
          path:'/index/web/customerService',
          name:'customerService',
          component: CustomerService,
          meta:{
            title: '客服'
          }
        },
        {
          path:'/index/web/getCoupon',
          name:'getCoupon',
          component: GetCoupon,
          meta:{
            title: '领取优惠券'
          }
        },
        {
          path:'/index/web/getCouponResult',
          name:'getCouponResult',
          component: GetCouponResult,
          meta:{
            title: '优惠券领取'
          }
        },
        {
          path:'/index/web/applicationPartner',
          name:'applicationPartner',
          component: ApplicationPartner,
          meta:{
            title: '申请合伙人'
          }
        },
        {
          path:'/index/web/mySalesman',
          name:'mySalesman',
          component: MySalesman,
          meta:{
            title: '我的销售员'
          }
        },
        {
          path:'/index/web/searchSalesman',
          name:'searchSalesman',
          component: SearchSalesman,
          meta:{
            title: '搜索'
          }
        },
        {
          path:'/index/web/searchSalesmanResult',
          name:'searchSalesmanResult',
          component: SearchSalesmanResult,
          meta:{
            title: '搜索'
          }
        },
        {
          path:'/index/web/myBalance',
          name:'myBalance',
          component: MyBalance,
          meta:{
            title: '我的余额'
          }
        },
        {
          path:'/index/web/withdrawCordInfo',
          name:'withdrawCordInfo',
          component: WithdrawCordInfo,
          meta:{
            title: '提现'
          }
        },
        {
          path:'/index/web/withdrawUserInfo',
          name:'withdrawUserInfo',
          component: WithdrawUserInfo,
          meta:{
            title: '提现'
          }
        },
        {
          path:'/index/web/withdrawSub',
          name:'withdrawSub',
          component: WithdrawSub,
          meta:{
            title: '申请提交'
          }
        },
        {
          path:'/index/web/withdrawalRecord',
          name:'withdrawalRecord',
          component: WithdrawalRecord,
          meta:{
            title: '提现记录'
          }
        },
        {
          path:'/index/web/memberRightsAndInterests',
          name:'memberRightsAndInterests',
          component: MemberRightsAndInterests,
          meta:{
            title: '会员权益'
          }
        },
        {
          path:'/index/web/setMore',
          name:'setMore',
          component: SetMore,
          meta:{
            title: '更多设置'
          }
        },
        {
          path:'/index/web/salesStatistics',
          name:'salesStatistics',
          component: SalesStatistics,
          meta:{
            title: '销售数据'
          }
        },
        {
          path:'/index/web/pushMoney',
          name:'pushMoney',
          component: PushMoney,
          meta:{
            title: '提成'
          }
        },
        {
          path:'/index/web/addSalesman',
          name:'addSalesman',
          component: AddSalesman,
          meta:{
            title: '添加销售员'
          }
        },
        {
          path:'/index/web/vipRule',
          name:'vipRule',
          component: VipRule,
          meta:{
            title: '会员权益'
          }
        },
        {
          path:'/index/web/Jigsaw',
          name:'Jigsaw',
          component: Jigsaw,
          meta:{
            title: '拼图'
          }
        },
        {
          path:'/index/web/Turntable',
          name:'Turntable',
          component: Turntable,
          meta:{
            title: '大转盘'
          }
        },
        {
          path:'/index/web/productW1',
          name:'productW1',
          component: ProductW1,
          meta:{
            title: '活动页面'
          }
        },
        {
          path:'/index/web/mxy',
          name:'manXingYunActivity',
          component: ManXingYunActivity,
          meta:{
            title: '满星云五周年'
          }
        },
        {
          path:'/index/web/shareSign',
          name:'shareSign',
          component: ShareSign,
          meta:{
            title: '分享领好礼'
          }
        },
        {
          path:'/index/web/newUserPrize',
          name:'newUserPrize',
          component: NewUserPrize,
          meta:{
            title: '新用户福利'
          }
        },
        {
          path:'/index/web/register',
          name:'register',
          component: Register,
          meta:{
            title: '注册'
          }
        },
        {
          path:'/index/web/forgetPwdAuthentication',
          name:'forgetPwdAuthentication',
          component: ForgetPwdAuthentication,
          meta:{
            title: '身份验证'
          }
        },
        {
          path:'/index/web/restPwd',
          name:'restPwd',
          component: RestPwd,
          meta:{
            title: '设置新密码'
          }
        },
        {
          path:'/index/web/login',
          name:'login',
          component: Login,
          meta:{
            title: '登陆'
          }
        },
        {
          path:'/index/web/restPwdFromCenter',
          name:'restPwdFromCenter',
          component: RestPwdFromCenter,
          meta:{
            title: '修改密码'
          }
        },
        {
          path:'/index/web/pCPay',
          name:'pCPay',
          component: PCPay,
          meta:{
            title: '支付'
          }
        },
        {
          path:'/index/web/gobang',
          name:'gobang',
          component: Gobang,
          meta:{
            title: '五子棋'
          }
        },
        {
          path:'/index/web/getAddressPage',
          name:'getAddressPage',
          component: GetAddressPage,
          meta:{
            title: '选择收货地址'
          }
        },
        {
          path:'/index/web/questionnaireSurvey',
          name:'questionnaireSurvey',
          component: QuestionnaireSurvey,
          meta:{
            title: ''
          }
        },
        {
          path:'/index/web/waterCardDetail',
          name:'waterCardDetail',
          component: WaterCardDetail,
          meta:{
            title: '水卡详情'
          }
        },
        {
          path:'/index/web/waterRecords',
          name:'waterRecords',
          component: WaterRecords,
          meta:{
            title: '水卡使用记录'
          }
        },
        {
          path:'/index/web/chooseWaterShop',
          name:'chooseWaterShop',
          component: ChooseWaterShop,
          meta:{
            title: '确认订单'
          }
        },
        {
          path:'/index/web/promotionCode',
          name:'promotionCode',
          component: PromotionCode,
          meta:{
            title: '推广二维码'
          }
        },
        {
          path:'/index/web/waterOrderList',
          name:'waterOrderList',
          component: WaterOrderList,
          meta:{
            title: '送水订单'
          }
        },
        {
          path:'/index/web/information',
          name:'information',
          component: Information,
          meta:{
            title: '发现'
          }
        },
        {
          path: '/index/web/columnList',
          name: 'columnList',
          component: ColumnList,
          meta: {
            title: '发现'
          }
        },
        {
          path: '/index/web/activities',
          name: 'activities',
          component: Activities,
          meta: {
            title: '活动'
          }
        },
        {
          path: '/index/web/activitiDetail',
          name: 'activitiDetail',
          component: ActivitiDetail,
          meta: {
            title: '活动详情'
          }
        },
        {
          path: '/index/web/addOnItem',
          name: 'addOnItem',
          component: AddOnItem,
          meta: {
            title: '商品凑单'
          }
        },
        {
          path: '/index/web/newProducts',
          name: 'newProducts',
          component: NewProducts,
          meta: {
            title: '新品上架'
          }
        },
        {
          path: '/index/web/limitProductList',
          name: 'limitProductList',
          component: LimitProductList,
          meta: {
            title: '每日限量疯抢榜'
          }
        },
        {
          path: '/index/web/bindingFamily',
          name: 'bindingFamily',
          component: BindingFamily,
          meta: {
            title: '绑定家人'
          }
        },
        {
          path: '/index/web/addFamily',
          name: 'addFamily',
          component: AddFamily,
          meta: {
            title: '添加家人'
          }
        },
        {
          path: '/index/web/detectionResultDay',
          name: 'detectionResultDay',
          component: DetectionResultDay,
          meta: {
            title: ''
          }
        },
        {
          path: '/index/web/detectionResultMonth',
          name: 'detectionResultMonth',
          component: DetectionResultMonth,
          meta: {
            title: ''
          }
        },
        {
          path: '/index/web/userHealthData',
          name: 'userHealthData',
          component: UserHealthData,
          meta: {
            title: '用户健康数据'
          }
        },
        {
          path: '/index/web/fillInfo',
          name: 'fillInfo',
          component: FillInfo,
          meta: {
            title: '用户信息'
          }
        },
      ]
    },
  ],

})
